package com.zut.blocks.service.grade;

import com.zut.blocks.base.common.request.CourseGradeRequest;
import com.zut.blocks.base.domain.CourseGrade;
import com.zut.blocks.base.service.GenericService;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author lxd
 * @date 2020/12/1 22:34
 */
public interface CourseGradeService extends GenericService<CourseGrade, Integer> {

    /**
     * find all course grade
     * @return
     */
    Page<CourseGrade> findAll(CourseGradeRequest request);

    /**
     * get course by course id
     * @param courseId
     * @return
     */
    List<CourseGrade> getByCourseId(Integer courseId);

    /**
     * save a course grade
     * @param courseGrade
     * @return
     */
    CourseGrade save(CourseGrade courseGrade);

    /**
     * delete one course grade
     * @param courseGradeId
     * @return
     */
    Integer delete(Integer courseGradeId);

    /**
     * find all course grade by course id
     * @param courseId
     * @return
     */
    List<CourseGrade> findAllByCourseId(Integer courseId);

    Integer add(CourseGrade courseGrade);
}
